---
author: hongbo
date: "2017-10-07"
previewImg:
badge: release
title: Announcing BuckleScript 1.7.0
description: |
---

## New Release

We are excited to announce `bs-platform@1.7.0`, which highlights following new features and changes:

### First class uncurried calling convention

As a functional language, the vanilla OCaml only provides curried calling
convention, BuckleScript employs fairly [advanced
optimizations](http://bucklescript.github.io/bucklescript-playground/#Curry_Optimization)
for curried calling convention, however, the most efficient code is efficient
code not relying on optimizations.

Since this release, we provide first class uncurried calling convention, _all
toolchains provided by BuckleScript_ can understand uncurried calling
convention

#### Curried calling convention

Let's show the feature with an example file called `test.ml`:

```ocaml
let f g x = g x [@bs]
```

or in Reason

```reason
let f = (g, x) => g(. x);
```

`f` is curried function, `g` is an uncurried function due to `[@bs]` annotation.
In Reason, the dot in `g(. x)` is equivalent to `[@bs]`.

When we evaluate the program with the `bsc` command...

```sh
bsc.exe -i test.ml # infer the type
```

...we will get following inferred interface:

```ocaml
val f : ('a -> 'b [@bs]) -> 'a -> 'b // <1>
```

or in Reason

```
let f: ((. 'a) => 'b, 'a) => 'b
```

As you can see in the examples above, `g` is inferred as an uncurried
function (`(. 'a) => 'b`) while `f` is still a curried function.

The compiler will also yield following JS output:

```js
function f(g, x) {
  return g(x);
}
```

Again, the code shows that...

- `f` is optimized and flattened
- `g` works like uncurried function

### API documentation

Now `ocamldoc` can understand `[@bs]` natively(instead of printing a desugared
output), we provide an [API
documentation](http://bucklescript.github.io/bucklescript/api/) for the library
shipped with BuckleScript, we plan to ship the documentation generator in next
release.

### More Interop including `Js.Promise.t`

### Unicode string and interpolation support

See [String
interpolation](../../docs/manual/interop-cheatsheet.mdx#string-unicode--interpolation)

### Catch exceptions raised on JS side

See [Catch exception](../../docs/manual/exception.mdx)

### Mixed data source

See
[`bs.open`](http://bucklescript.github.io/bucklescript/Manual.html#__code_bs_open_code_type_safe_external_data_source_handling_since_1_7_0)

### ES6 support in Safari

See [fix es6 support in
browser](https://github.com/bucklescript/bucklescript/issues/1465)

### `bs-dev-dependencies` support in the build system

See [build
schema](http://bucklescript.github.io/bucklescript/docson/#build-schema.json)

### `bs.as` accept json literal support

This feature is mentioned in the [Functions / Fixed Arguments](../../docs/manual/bind-to-js-function.mdx#fixed-arguments) section.

### Bug fixes, performance improvement, and stress tests

[#1549](Notable bug fixes
https://github.com/bucklescript/bucklescript/issues/1549),
[#1539](https://github.com/bucklescript/bucklescript/issues/1539),
[#1520](https://github.com/bucklescript/bucklescript/issues/1520)
